package com.sunday.common.mq.kafka.study.spring.e6_Receiving_Messages_5_Json_Serializer;


import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.listener.adapter.RecordFilterStrategy;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class RecordFilterStrategyImpl implements RecordFilterStrategy {

    @Override
    public boolean filter(ConsumerRecord consumerRecord) {
        log.info("{}", consumerRecord);
        return "123".equals(consumerRecord.key());
    }

}
